/* $RCSFile: PagingDesigner.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/ADNCRM.Core/UI/Design/PagingDesigner.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:29  christian.surieux
 *   Added Log to All cs files
 */

using System;
using System.IO;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.Design.WebControls;
using System.ComponentModel;

namespace AddonNice.UI.Design
{
	/// <summary>
	/// Designer support for paging
	/// </summary>
	public class PagingDesigner : CompositeControlDesigner 
	{
		/// <summary>
		/// Component is the instance of the component or control that
		/// this designer object is associated with. This property is 
		/// inherited from System.ComponentModel.ComponentDesigner.
		/// </summary>
		/// <returns></returns>
		public override string GetDesignTimeHtml() 
		{
            
			AddonNice.UI.WebControls.Paging paging = (AddonNice.UI.WebControls.Paging) Component;

			using (StringWriter sw = new StringWriter())
			{
				using (HtmlTextWriter tw = new HtmlTextWriter(sw))
				{
					paging.HideOnSinglePage = false;
					//paging.RefreshButtons();
					paging.RenderControl(tw);
				}
				return sw.ToString();
			}
		}
	}
}